package world.ztomorrow.push.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import world.ztomorrow.common.dto.RestResp;
import world.ztomorrow.push.dto.resp.HomeBookRespDto;
import world.ztomorrow.push.dto.resp.HomeFriendLinkRespDto;
import world.ztomorrow.push.service.HomeService;

import java.util.List;


@RestController
@RequestMapping("/front/home")
@RequiredArgsConstructor
public class PushController  {

    private final HomeService homeService;

    @GetMapping("/books")
    public RestResp<List<HomeBookRespDto>> listHomeBooks() {
        return RestResp.ok(homeService.listHomeBooks());
    }

    @GetMapping("/friend_Link/list")
    public RestResp<List<HomeFriendLinkRespDto>> listHomeFriendLinks() {
        return RestResp.ok(homeService.listHomeFriendLinks());
    }

}
